include $(RTMEUSDIR)/src/Makefile.generic

TARGET   = TestOutState
OBJFILES = $(TARGET).o 
OBJS     = $(addprefix $(OBJDIR)/, $(OBJFILES))
TARGETLIB = $(LIBDIR)/$(TARGET).$(LSFX)
TARGETCOMP = $(BINDIR)/$(TARGET)Comp
LDFLAGS += -L$(LIBDIR) -lStateService

all: $(TARGETLIB) $(BINDIR)/$(TARGET)Comp $(BINDIR)/TestOutState.conf

.cpp.o:
	rm -f $@
	$(CXX) $(CXXFLAGS) -c -o $@ $<

$(TARGETLIB): $(OBJS)
	rm -f $@
	$(CXX) $(SHFLAGS) -o $@ $(OBJS) $(LDFLAGS)

$(TARGETCOMP): $(OBJDIR)/$(TARGET)Comp.o $(OBJS)
	$(CXX) -o $@ $(OBJDIR)/$(TARGET)Comp.o $(OBJS) $(LDFLAGS) 

$(BINDIR)/TestOutState.conf: TestOutState.conf
	cp -f TestOutState.conf $(BINDIR)/

clean: clean_objs
	rm -f *~ 

clean_objs:
	rm -f $(OBJS) $(OBJDIR)/$(TARGET)Comp.o $(TARGETLIB) $(TARGETCOMP)


$(OBJDIR)/$(TARGET).o: $(TARGET).cpp $(TARGET).h
	rm -f $@
	$(CXX) $(CXXFLAGS) $(EXTRAINCS) -c -o $@ $<

$(OBJDIR)/$(TARGET)Comp.o: $(TARGET)Comp.cpp 
	rm -f $@
	$(CXX) $(CXXFLAGS) $(EXTRAINCS) -c -o $@ $<

# end of Makefile





